import Vue from 'vue'
import App from './App.vue'
// 6.2 导入路由模块
import router from './router/index'


import { Swipe, SwipeItem } from 'vant';
import { Col, Row } from 'vant';
import { Tabbar, TabbarItem } from 'vant';
import { Icon } from 'vant';
import { NavBar } from 'vant';
import { Button } from 'vant';
import { Toast } from 'vant';
import { Tab, Tabs } from 'vant';

Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Toast);
Vue.use(Button);
Vue.use(NavBar);
Vue.use(Icon);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Col);
Vue.use(Row);
Vue.use(Swipe);
Vue.use(SwipeItem);

// 通过过滤器实现时间的格式化处理
Vue.filter('formatDate', (val) => {
  if (val) {
    return val.replace('T', '  ').replace('.000Z', '  ')
  }
})
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
